package com.example.kotlinlearndemo.expand

import kotlinx.android.synthetic.main.activity_main.*
import android.view.View
import android.widget.Button
import android.widget.Toast
import androidx.databinding.BindingAdapter

@BindingAdapter("showToast")
fun Button.showToast(msg:String){
    setOnClickListener {
        Toast.makeText(context,msg,Toast.LENGTH_SHORT).show()
    }
}

var Button.ppp: String
    get():String{
        return text.toString()+"dddd"
    }
    set(value){
        text=value
    }